#!/bin/sh

defaultPath=./src/hello-world
defaultBranch=master

src=plugins
clonefile=change-branches.sh
clonepath=${src}/${clonefile}

instance=${1:-""}

if [ -e ${clonepath} ] ; then
    sh ${clonepath} ${instance}
else
    echo "Ignored input: ${instance}"
    echo "Default checkout uses branch: ${defaultBranch}"
    cd ${defaultPath}
    git checkout ${defaultBranch}
fi

